<template>
	<view>
		<swiper :indicator-dots="true" :autoplay="false" :interval="3000" :duration="1000" :vertical="false"
			:circular="true" style="height: 150px; background-color: aquamarine;">
			<swiper-item v-for="item,index in list">
				<view class="swiper-item" style="width: 100%; height: 100%;">
					<image :src="item" mode="" style="width: 100%; height: 100%;"></image>
				</view>

			</swiper-item>
		</swiper>
		<div class="class">
			<p>功能列表</p>
		</div>
		<swiper :indicator-dots="true" :autoplay="false" :interval="3000" :duration="1000">
			<swiper-item>
				<uni-grid :column="5">
					<uni-grid-item :index="index" v-for="(item,index) in typelist">
						<view class="grid-item">
							<image :src="'../..'+item.icon" mode="" style="width: 50px;height: 50px;"></image>
							<text>{{item.typename}}</text>
						</view>
					</uni-grid-item>
				</uni-grid>
			</swiper-item>
			<swiper-item>
				<uni-grid :column="5">
					<uni-grid-item :index="index" v-for="(item,index) in typelist2">
						<view class="grid-item">
							<image :src="'../..'+item.icon" mode="" style="width: 50px;height: 50px;"></image>
							<text>{{item.typename}}</text>
						</view>
					</uni-grid-item>
				</uni-grid>
			</swiper-item>
		</swiper>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				"typelist": [{
						"id": 1,
						"typename": "新闻",
						"icon": "/static/xinwen.png"
					},
					{
						"id": 2,
						"typename": "公告",
						"icon": "/static/pingtaigonggao.png"
					},
					{
						"id": 3,
						"typename": "同学",
						"icon": "/static/tongxue.png"
					},
					{
						"id": 4,
						"typename": "电话",
						"icon": "/static/dianhua.png"
					},
					{
						"id": 5,
						"typename": "留言",
						"icon": "/static/liuyan.png"
					}
				],
				"typelist2": [{
						"id": 1,
						"typename": "新闻",
						"icon": "/static/xinwen.png"
					},
					{
						"id": 2,
						"typename": "公告",
						"icon": "/static/pingtaigonggao.png"
					},
					{
						"id": 3,
						"typename": "同学",
						"icon": "/static/tongxue.png"
					},
					{
						"id": 4,
						"typename": "电话",
						"icon": "/static/dianhua.png"
					},
					{
						"id": 5,
						"typename": "留言",
						"icon": "/static/liuyan.png"
					}
				],
				"list": ['../../static/school.jpg', '../../static/cat-7.png', '../../static/logo.png']
			}
		},
		methods: {

		}
	}
</script>

<style>
	page {
		height: 100%;
	}

	,
	.grid-item {
		/* //让内容上下排列,中部居中 */
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.class {
		padding: 20rpx;
	}
</style>